﻿@model IEnumerable<CW_MenuView>

    @foreach (var item in Model)
    {
        <li>            
            @if (item.ChildList.Count > 0)
            {
                <a href="#" class="firstMenu">@item.menu.MenuName <span class="caret"></span></a>
                <ul class="subMenu">
                    @foreach (var sub in item.ChildList)
                    {
                        <li><a href="@Url.Action("ArticleType", new { menuid = sub.MenuId })">@sub.MenuName</a></li>
                    }
            </ul>
            }
            else
            {
                <a href="@Url.Action("ArticleType", new { menuid = item.menu.MenuId })" class=" firstmenu">@item.menu.MenuName </a>                
            }           
        </li>
    }

